<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:setBundle basename="messages.messages"/>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<link rel="stylesheet" href="/Epics/jslib/global.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><fmt:message key="siteName"/></title>
</head>

<body>
	<%@ include file="../Template/TMainLine.jsp" %>
	<h1>Welcome to EPics!</h1>
	<img src=".\images\EPics.png" alt="EPics"/><br/>
	<a href="SSearchPhotos">Search photos</a><br/>
	
	<c:if test="${!empty photos }">
		<h3>Recently added:</h3>
		<table>
		<c:forEach items="${photos}" var="photo">
			<tr>
				<td><a href="SViewPhoto?photoId=${photo.id }"><img src=".${photo.thumbnailLocation }" alt="${photo.description}"/></a></td>
				<td><a href="SViewPhoto?photoId=${photo.id }">${photo.title }</a></td>
			</tr>
		</c:forEach>
		</table>
	</c:if>
</body>
</html>